package com.qfedu.api.controller;

import com.qfedu.api.service.AccountService;
import com.qfedu.api.service.OrderService;
import com.qfedu.common.param.AccountTblAdd;
import com.qfedu.common.param.OrderTblAdd;
import com.qfedu.common.vo.R;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @program: Seata01
 * @description: 控制层实现常用的外部接口，api接口,类-OrderTblController
 * @author: Feri
 * @create: 2024-11-15 08:29:51
 */
@RestController
@RequestMapping("api/account")
@Tag(name = "账户服务")
public class AccountController {
    /**
    *注入OrderTbl业务对象*/
    @Resource
    private AccountService service;

    /**
    * 新增内容*/
    @Operation(summary = "新增账户")
    @PostMapping("save")
    public R save(@RequestBody AccountTblAdd add){
       return service.save(add);
    }

    /**
    * 查询 所有数据*/
    @Operation(summary = "查询所有账户")
    @GetMapping("all")
    public R all(){
       return service.all();
    }

}